package com.example.service.impl;

import org.springframework.stereotype.Component;

import javax.servlet.*;
import java.io.IOException;

/**
 * @author long
 */
//@Component
public class MyFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("线程："+Thread.currentThread()+"---------调用到MyFilter---------");
        chain.doFilter(request,response);
    }

    @Override
    public void destroy() {

    }

}
